<%@page import="com.shoeshopping.entity.User"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.shoeshopping.entity.Goods"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@page import="java.util.List"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

User user = ((User)session.getAttribute("user"));
String username = null;
if(user!=null){
	username = user.getUsername();
}
%>

<!DOCTYPE HTML>
<html>
	<head>
	<base href="<%=basePath%>">
		<title>Prosucts</title>
		<link href="css/style.css" rel='stylesheet' type='text/css' />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
		</script>
		<!----webfonts---->
		<link href='css/css.css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
		<!----//webfonts---->
		<!----start-alert-scroller---->
		<script src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/jquery.easy-ticker.js"></script>
		<script type="text/javascript">
		$(document).ready(function(){
			$('#demo').hide();
			$('.vticker').easyTicker();
		});
		</script>
		<!----start-alert-scroller---->
		<!-- start menu -->
		<link href="css/megamenu.css" rel="stylesheet" type="text/css" media="all" />
		<script type="text/javascript" src="js/megamenu.js"></script>
		<script>$(document).ready(function(){$(".megamenu").megamenu();});</script>
		<script src="js/menu_jquery.js"></script>
		<!-- //End menu -->
		<!---slider---->
		<link rel="stylesheet" href="css/slippry.css">
		<script src="js/jquery-ui.js" type="text/javascript"></script>
		<script src="js/scripts-f0e4e0c2.js" type="text/javascript"></script>
		<script>
			  jQuery('#jquery-demo').slippry({
			  // general elements & wrapper
			  slippryWrapper: '<div class="sy-box jquery-demo" />', // wrapper to wrap everything, including pager
			  // options
			  adaptiveHeight: false, // height of the sliders adapts to current slide
			  useCSS: false, // true, false -> fallback to js if no browser support
			  autoHover: false,
			  transition: 'fade'
			});
		</script>
		<!---move-top-top---->
		<script type="text/javascript" src="js/move-top.js"></script>
		<script type="text/javascript" src="js/easing.js"></script>
		<script type="text/javascript">
			jQuery(document).ready(function($) {
				$(".scroll").click(function(event){		
					event.preventDefault();
					$('html,body').animate({scrollTop:$(this.hash).offset().top},1200);
				});
			});
		</script>
		<!---//move-top-top---->
	</head>
	<body>
		<!---start-wrap---->
			<!---start-header---->
			<div class="header">
				
				<%//jsp include进 top-header %>
				<jsp:include page="/component/top-header.jsp" flush="true">
						<jsp:param value='<%=username %>' name="username"/>
				</jsp:include>
				
				<%//jsp include进 middle-header %>
				<jsp:include page="/component/middle-header.jsp" flush="true"/>
				
				<%//jsp include进 middle-header %>
				<jsp:include page="/component/bottom-header.jsp" flush="true"/>
				</div>
		<div class="content product-box-main">
			<div class="wrap">
			
				<div class="content-right product-box">
					<div class="product-box-head">
							<div class="product-box-head-left">
								<h3>分类名称</h3>
							</div>
							<div class="clear"> </div>
					</div>
					<div class="product-grids">
						<!--- start-rate---->
							<script src="js/jstarbox.js"></script>
							<link rel="stylesheet" href="css/jstarbox.css" type="text/css" media="screen" charset="utf-8" />
							<!---//End-rate---->
								<%//for循环生成商品 %>
							<%
								List goodses = (List)request.getAttribute("goodsesOfType");
								for(int i=1; i<goodses.size(); i++){
								
									Goods goods = (Goods)goodses.get(i);
									if(i%3==0){
								%>
									<jsp:include page="/component/goodItemLast.jsp" flush="true">
									<jsp:param value="<%=goods.getName() %>" name="name"/>
									<jsp:param value="<%=goods.getPrice() %>" name="price"/>
									<jsp:param value="<%= goods.getImgPath()%>" name="imgPath"/>
									</jsp:include>
								<%}
								else{
								%>
									<jsp:include page="/component/goodItem.jsp" flush="true">
									<jsp:param value="<%=goods.getName() %>" name="name"/>
									<jsp:param value="<%=goods.getPrice() %>" name="price"/>
									<jsp:param value="<%= goods.getImgPath()%>" name="imgPath"/>
									</jsp:include>
								<%
									}
								}
							 %>
						<div class="clear"> </div>
					</div>
				</div>
				<div class="clear"> </div>
			</div>
		</div>
</body>
</html>

